home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel
/
CAROUSEL.cdr
/
mactosh
/
hc
/
summariz.sit
/
Summarizer 1.7
/
stack.txt
< prev
Wrap
Text File
|
1988-03-18
|
10KB
|
329 lines
-- stack: in.7
-- format: 8 (HyperCard 1)
-- flags: 0x0 (none)
-- protect password hash: 0
-- maximum user level: 5 (scripting)
-- window: Rect(x1=0, y1=0, x2=0, y2=0)
-- screen: Rect(x1=0, y1=0, x2=0, y2=0)
-- card dimensions: w=0 h=0
-- scroll: x=0 y=0
-- background count: 4
-- first background id: 2737
-- card count: 10
-- first card id: 3853
-- list block id: 2818
-- print block id: 4650
-- font table block id: 0
-- style table block id: 0
-- free block count: 0
-- free size: 0 bytes
-- total size: 55936 bytes
-- stack block size: 9216 bytes
-- created by hypercard version: 0x00000000
-- compacted by hypercard version: 0x00000000
-- modified by hypercard version: 0x00000000
-- opened by hypercard version: 0x00000000
-- patterns[0]: 0x0000000000000000
-- patterns[1]: 0x8000000008000000
-- patterns[2]: 0x8800220088002200
-- patterns[3]: 0x8888222288882222
-- patterns[4]: 0x88AA22AA88AA22AA
-- patterns[5]: 0xCCAA33AACCAA33AA
-- patterns[6]: 0xEEAABBAAEEAABBAA
-- patterns[7]: 0xEEBBBBEEEEBBBBEE
-- patterns[8]: 0xFFBBFFEEFFBBFFEE
-- patterns[9]: 0xFFBBFFFFFFBBFFFF
-- patterns[10]: 0x8010022001084004
-- patterns[11]: 0xFFFFFFFFFFFFFFFF
-- patterns[12]: 0x8822882288228822
-- patterns[13]: 0x1122448811224488
-- patterns[14]: 0xC4800C6843023026
-- patterns[15]: 0xB130031BD8C00C8D
-- patterns[16]: 0xAA00AA00AA00AA00
-- patterns[17]: 0x8822552288225522
-- patterns[18]: 0x8855225588552255
-- patterns[19]: 0x77DD77DD77DD77DD
-- patterns[20]: 0x8000000000000000
-- patterns[21]: 0xAA55AA55AA55AA55
-- patterns[22]: 0x038448300C020101
-- patterns[23]: 0x8244394482010101
-- patterns[24]: 0x8814224188412214
-- patterns[25]: 0x8080413E080814E3
-- patterns[26]: 0x22048C7422179810
-- patterns[27]: 0xBE808808EB088880
-- patterns[28]: 0x25C8328964244C92
-- patterns[29]: 0xA29C41BE2AC914EB
-- patterns[30]: 0x40A00000040A0000
-- patterns[31]: 0x8040200002040800
-- patterns[32]: 0xAA00800088008000
-- patterns[33]: 0xFF80808080808080
-- patterns[34]: 0x081C22C180010204
-- patterns[35]: 0xFF808080FF080808
-- patterns[36]: 0xF87422478F172271
-- patterns[37]: 0xBF00BFBFB0B0B0B0
-- patterns[38]: 0xFF7FBE5DA2418000
-- patterns[39]: 0xFAF5FAF5A050A050
-- checksum: 0x0
----- HyperTalk script -----
on openstack
set userlevel to 5
hide menubar
get short name of this stack
put it into card field "stkname"
wait 3 seconds
go to card "ChptLstCrd"
end openstack
on NoTpcCrd
global Chapt,ChptName
if the number of chars in ChptName > 35
then put char 1 to 35 of ChptName & "..." into ChptName
answer "A card is incorrectly named! or is missing!" with "OK"
answer ChptName && "=" && Chapt with "OK"
answer "Should Summarizer insert a card " && quote & Chapt & quote && "?" with "Cancel" or "OK"
if it is empty or it is "Cancel" then exit NoTpcCrd
set lockscreen to true
put MakeCard("TpcLstTmplt") into dummy
set the name of this card to Chapt
go to card "ChptLstCrd"
flash 2
put "Try going to card" && quote & Chapt & quote && "now."
wait 2 seconds
hide msg
end NoTpcCrd
on NoNtCrd
global UserChoice,NtHeader
put short name of this card into WasHere
if the number of chars in NtHeader > 35
then put char 1 to 35 of NtHeader & "..." into NtHeader
answer "A card is incorrectly named! or is missing!" with "OK"
answer NtHeader && "=" && UserChoice with "OK"
type "f" with commandKey
type NtHeader
answer "Should Summarizer insert a card " && quote & UserChoice & quote && "?" with "Cancel" or "OK"
if it is empty or it is "Cancel" then exit NoNtCrd
set lockscreen to true
put MakeCard("NtTmplt") into dummy
set the name of this card to UserChoice
put Ntheader into field "HeaderFld"
flash 2
go to card WasHere
set lockscreen to false
put "Try going to card" && quote & UserChoice & quote && "now."
wait 2 seconds
hide msg
end NoNtCrd
on domenu
global ptype
put the param of 1 into ptype
if ptype is "new background" then
answer "You cannot add backgrounds to this stack!" with "OK"
exit domenu
end if
if ptype is "copy card" or ptype is "paste card" or ptype is "cut card" then
answer "You are trying to cut/copy/paste a card!..." with "OK"
answer "Only Summarizer may cut/copy/paste cards!" with "OK"
exit domenu
end if
if ptype contains "paste" then
answer "About to" && ptype && "from clipboard" with "Cancel" or "OK"
if it is "Cancel" then exit domenu
end if
if ptype is "new card" or ptype is "delete card" then
get the name of the target
if it contains "button" or it contains "ChptLstFld" or it contains "TpcLstFld" then
pass domenu
else
answer "You are trying to make/delete a card!..." with "OK"
answer "Only Summarizer may make/delete cards!" with "OK"
exit domenu
end if
end if
if ptype is "cut " then
get the name of the target
if it contains "button" then
beep 1
answer "There must be graphics to cut!" with "OK"
exit domenu
else
answer "There is nothing selected to cut!"
end if
end if
pass domenu
end domenu
on MakePage
put empty into NwCrd
put field "HeaderFld" into StrtCrdHeader
put short name of next card into RCard
put short name of this card into StrtCrd
set lockscreen to "true"
if RCard is "@" then
domenu "new card"
set name of this card to "@"
if StrtCrd is "@" then
put StrtCrdHeader into field "HeaderFld"
else
put "…" && StrtCrdHeader && "Cont." into field "HeaderFld"
end if
put "true" into NwCrd
else
put "false" into NwCrd
end if
domenu "new button"
set name of button "new button" to "NxtPg"
set showname of button "NxtPg" to false
set rect of button "NxtPg" to 460, 0, 480, 17
set icon of button "NxtPg" to "sml Next Arrow"
set loc of button "NxtPg" to 460,8
set style of button "NxtPg" to opaque
set script of button "NxtPg" to "On mouseup" & return & "go to next card" & return & "if the number of card fields is 1 then" & return & "get rect of card field" && quote & "txtfld" & quote & return & "delete item 4 of it" & return & "delete item 3 of it" & return & "click at it" & return & "end if" & return & "end mouseup"
if not NwCrd then
domenu "new card"
set name of this card to "@"
if StrtCrd is "@" then
put StrtCrdHeader into field "HeaderFld"
else
put "…" && StrtCrdHeader && "Cont." into field "HeaderFld"
end if
end if
domenu "new button"
set name of button "new button" to "PrvPg"
set showname of button "PrvPg" to false
set rect of button "PrvPg" to 481, 0, 501, 17
set icon of button "PrvPg" to "sml Prev Arrow"
set loc of button "PrvPg" to 481,8
set style of button "PrvPg" to opaque
set script of button "PrvPg" to "On mouseup" & return & "go to prev card" & return & "if the number of card fields is 1 then" & return & "get rect of card field" && quote & "txtfld" & quote & return & "delete item 4 of it" & return & "delete item 3 of it" & return & "click at it" & return & "end if" & return &"end mouseup"
choose browse tool
end MakePage
on MakeField
global WindType
domenu "New field"
set name of card field "" to "TxtFld"
set rect of card field "TxtFld" to 19,18,512,342
if WindType is "Scroll"
then set Style of card field "TxtFld" to Scrolling
if WindType is "Reg Text"
then set Style of card field "Txtfld" to transparent
set textFont of card field "TxtFld" to geneva
set TextSize of card field "Txtfld" to 9
set locktext of card field "Txtfld" to false
set wideMargins of card field "Txtfld" to true
put IBeam("TxtFld") into dummy
end MakeField
on SendTxtToFld
global Xit, flName
put False into Xit
answer "Stop entry of text..." with "at TAB" or "at RETURN" or "after ? chars"
put it into Delimiter
if delimiter is "after ? chars" then
beep 1
put "30,000 chars max for scroll/reg field!"
ask "Enter number of characters to read"
if it is empty then
hide msg
put true into Xit
exit SendTxtToFld
end if
put it into NumWds
hide msg
read from file flName for NumWds
end if
if delimiter is "at TAB"
then read from file flName until Tab
if delimiter is "at RETURN"
then read from file flName until Return
if it is empty then
beep 1
put "End of file!"
show msg
wait 2 seconds
hide msg
put true into Xit
exit SendTxtToFld
end if
put it after card field "TxtFld"
end SendTxtToFld
function Bs10To26 Base10
put 9999 into quotient
put empty into Base26
repeat while quotient is not 0
put Base10 div 26 into quotient
put NumToChar of (Base10 mod 26 + 65) before Base26
put quotient into Base10
end repeat
return Base26
end Bs10To26
function MakeCard template
go to card template
domenu "new card"
end MakeCard
function IBeam CrdFld
choose browse tool
set lockscreen to false
get rect of card field CrdFld
delete item 4 of it
delete item 3 of it
click at it
end IBeam
function DelCards ChptNam
go to card ChptNam
put number of lines in field "TpcLstFld" into LstNum
domenu "delete card"
repeat with x = 1 to LstNum
go to card ChptNam & x
domenu "delete card"
repeat while short name of this card is "@"
domenu "delete card"
end repeat
end repeat
go to card "ChptLstCrd"
end DelCards
function GetLnNum clkdItem, whichFld
global NumChpt,XactMtch,Xit
put false into Xit
repeat with LnNum = 1 to NumChpt
if XactMtch then
if whichFld is "ChptLstFld" then
if clkdItem is line LnNum of card field "ChptLstFld" then
exit repeat
end if
else
if clkdItem is line LnNum of field "TpcLstFld" then
exit repeat
end if
end if
else
if whichFld is "ChptLstFld" then
if clkdItem is in line LnNum of card field "ChptLstFld" then
exit repeat
end if
else
if clkdItem is in line LnNum of field "TpcLstFld" then
exit repeat
end if
end if
end if
if LnNum is NumChpt then
beep 1
put quote & clkdItem & quote && "is not in the list!"
wait 2 seconds
hide msg
put true into Xit
exit GetLnNum
end if
end repeat
return LnNum
end GetLnNum